package com.demo.ioc;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class testIOC {
    @Test
    public void testIoc() {
        String xmlConfig="com/demo/ioc/applicationContext.xml";
        ApplicationContext applicationContext=new ClassPathXmlApplicationContext(xmlConfig);
        UserService userService= (UserService) applicationContext.getBean("userServiceId");
        userService.hello();
    
    }
}
